1. Field of the Invention
The present invention relates generally to the field of concurrency control. More specifically, the present invention is related to a locking protocol for hierarchical data.
2. Discussion of Prior Art
As XML is increasingly used for data exchange over distributed systems, interest in its use as a database data model capable of handling flexibly structured hierarchical data is correspondingly heightened. Currently, a single XML document is used to represent data equivalent to multiply joined relational tables, or even an entire relational database containing interconnected data. Using XML enables databases to obviate the need for normalization and de-normalization; decomposing relational data into multiple tables and re-assembling data using join queries.
In certain cases, XML databases support sub-document concurrency control, allowing users simultaneous access to XML data. Existing techniques of locking individual data records representing nodes in use, which are identified by record identifiers (RIDs), are limited in their provision of data consistency due to the hierarchical nature of XML data. Straightforward extensions of existing locking protocols to XML trees; for example, locking data records corresponding to nodes in the path from a root node to a node currently in use via RID are inefficient.
Typically, a single lock manager handles lock and release requests for an entire database system. Lock and release requests are sent to a lock manager, which is additionally provided as input, a resource ID, node ID, lock mode, and other relevant information. Often implemented in tandem, is a thin layer that performs conversion from one, explicit lock or release request, to an equivalent set of requests for a lock manager. Although such an approach reduces interaction between entities requesting a lock or a release and a lock manager, it is limited in its provision of lock request processing cost reduction.
Thus, there is a need in the art for a locking protocol that supports sub-document concurrency control of hierarchical node data, as well lock manager logic reducing lock-processing cost. A protocol utilizing prefix encoded node identifiers (IDs) exploits a property in which a current node ID is comprised of node IDs of ancestor nodes along the path from the root to a current node. An explicit lock request on a node having a particular node ID derives an implicit lock request the prefix of the particular node ID. An implicitly locked node ID prefix represents intention locks on ancestor nodes assigned node IDs contained within the prefix, from its immediate parent node to a root node ID.
Whatever the precise merits, features, and advantages of the above cited references, none of them achieves or fulfills the purposes of the present invention.